Passed
Push — master ( 2b9795...8c3433 )
by Aimeos
07:40
created

Standard::prefix()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * @license LGPLv3, https://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2015-2024
6
 * @package MShop
7
 * @subpackage Order
8
 */
9
10
11
namespace Aimeos\MShop\Order\Manager\Address;
12
13
14
/**
15
 * Default order address manager implementation.
16
 *
17
 * @package MShop
18
 * @subpackage Order
19
 */
20
class Standard
21
	extends \Aimeos\MShop\Common\Manager\Base
22
	implements \Aimeos\MShop\Order\Manager\Address\Iface, \Aimeos\MShop\Common\Manager\Factory\Iface
23
{
24
	private array $searchConfig = [
25
		'order.address.parentid' => [
26
			'label' => 'Order ID',
27
			'internalcode' => 'parentid',
28
			'type' => 'int',
29
			'public' => false,
30
		],
31
		'order.address.addressid' => [
32
			'label' => 'Customer address ID',
33
			'internalcode' => 'addrid',
34
			'public' => false,
35
		],
36
		'order.address.type' => [
37
			'label' => 'Address type',
38
			'internalcode' => 'type',
39
		],
40
		'order.address.company' => [
41
			'label' => 'Address company',
42
			'internalcode' => 'company',
43
		],
44
		'order.address.vatid' => [
45
			'label' => 'Address Vat ID',
46
			'internalcode' => 'vatid',
47
		],
48
		'order.address.salutation' => [
49
			'label' => 'Address salutation',
50
			'internalcode' => 'salutation',
51
		],
52
		'order.address.title' => [
53
			'label' => 'Address title',
54
			'internalcode' => 'title',
55
		],
56
		'order.address.firstname' => [
57
			'label' => 'Address firstname',
58
			'internalcode' => 'firstname',
59
		],
60
		'order.address.lastname' => [
61
			'label' => 'Address lastname',
62
			'internalcode' => 'lastname',
63
		],
64
		'order.address.address1' => [
65
			'label' => 'Address part one',
66
			'internalcode' => 'address1',
67
		],
68
		'order.address.address2' => [
69
			'label' => 'Address part two',
70
			'internalcode' => 'address2',
71
		],
72
		'order.address.address3' => [
73
			'label' => 'Address part three',
74
			'internalcode' => 'address3',
75
		],
76
		'order.address.postal' => [
77
			'label' => 'Address postal',
78
			'internalcode' => 'postal',
79
		],
80
		'order.address.city' => [
81
			'label' => 'Address city',
82
			'internalcode' => 'city',
83
		],
84
		'order.address.state' => [
85
			'label' => 'Address state',
86
			'internalcode' => 'state',
87
		],
88
		'order.address.countryid' => [
89
			'label' => 'Address country ID',
90
			'internalcode' => 'countryid',
91
		],
92
		'order.address.languageid' => [
93
			'label' => 'Address language ID',
94
			'internalcode' => 'langid',
95
		],
96
		'order.address.telephone' => [
97
			'label' => 'Address telephone',
98
			'internalcode' => 'telephone',
99
		],
100
		'order.address.telefax' => [
101
			'label' => 'Address telefax',
102
			'internalcode' => 'telefax',
103
		],
104
		'order.address.mobile' => [
105
			'label' => 'Address mobile number',
106
			'internalcode' => 'mobile',
107
		],
108
		'order.address.email' => [
109
			'label' => 'Address email',
110
			'internalcode' => 'email',
111
		],
112
		'order.address.website' => [
113
			'label' => 'Address website',
114
			'internalcode' => 'website',
115
		],
116
		'order.address.birthday' => [
117
			'label' => 'Address birthday',
118
			'internalcode' => 'birthday',
119
			'type' => 'date',
120
		],
121
		'order.address.longitude' => [
122
			'label' => 'Address longitude',
123
			'internalcode' => 'longitude',
124
			'public' => false,
125
		],
126
		'order.address.latitude' => [
127
			'label' => 'Address latitude',
128
			'internalcode' => 'latitude',
129
			'public' => false,
130
		],
131
		'order.address.position' => [
132
			'label' => 'Address position',
133
			'internalcode' => 'pos',
134
			'type' => 'int',
135
			'public' => false,
136
		],
137
	];
138
139
140
	/**
141
	 * Counts the number items that are available for the values of the given key.
142
	 *
143
	 * @param \Aimeos\Base\Criteria\Iface $search Search criteria
144
	 * @param array|string $key Search key or list of keys to aggregate items for
145
	 * @param string|null $value Search key for aggregating the value column
146
	 * @param string|null $type Type of the aggregation, empty string for count or "sum" or "avg" (average)
147
	 * @return \Aimeos\Map List of the search keys as key and the number of counted items as value
148
	 */
149
	public function aggregate( \Aimeos\Base\Criteria\Iface $search, $key, string $value = null, string $type = null ) : \Aimeos\Map
150
	{
151
		/** mshop/order/manager/address/aggregate/mysql
152
		 * Counts the number of records grouped by the values in the key column and matched by the given criteria
153
		 *
154
		 * @see mshop/order/manager/address/aggregate/ansi
155
		 */
156
157
		/** mshop/order/manager/address/aggregate/ansi
158
		 * Counts the number of records grouped by the values in the key column and matched by the given criteria
159
		 *
160
		 * Groups all records by the values in the key column and counts their
161
		 * occurence. The matched records can be limited by the given criteria
162
		 * from the order database. The records must be from one of the sites
163
		 * that are configured via the context item. If the current site is part
164
		 * of a tree of sites, the statement can count all records from the
165
		 * current site and the complete sub-tree of sites.
166
		 *
167
		 * As the records can normally be limited by criteria from sub-managers,
168
		 * their tables must be joined in the SQL context. This is done by
169
		 * using the "internaldeps" property from the definition of the ID
170
		 * column of the sub-managers. These internal dependencies specify
171
		 * the JOIN between the tables and the used columns for joining. The
172
		 * ":joins" placeholder is then replaced by the JOIN strings from
173
		 * the sub-managers.
174
		 *
175
		 * To limit the records matched, conditions can be added to the given
176
		 * criteria object. It can contain comparisons like column names that
177
		 * must match specific values which can be combined by AND, OR or NOT
178
		 * operators. The resulting string of SQL conditions replaces the
179
		 * ":cond" placeholder before the statement is sent to the database
180
		 * server.
181
		 *
182
		 * This statement doesn't return any records. Instead, it returns pairs
183
		 * of the different values found in the key column together with the
184
		 * number of records that have been found for that key values.
185
		 *
186
		 * The SQL statement should conform to the ANSI standard to be
187
		 * compatible with most relational database systems. This also
188
		 * includes using double quotes for table and column names.
189
		 *
190
		 * @param string SQL statement for aggregating order items
191
		 * @since 2014.09
192
		 * @see mshop/order/manager/address/insert/ansi
193
		 * @see mshop/order/manager/address/update/ansi
194
		 * @see mshop/order/manager/address/newid/ansi
195
		 * @see mshop/order/manager/address/delete/ansi
196
		 * @see mshop/order/manager/address/search/ansi
197
		 * @see mshop/order/manager/address/count/ansi
198
		 */
199
		$cfgkey = 'mshop/order/manager/address/aggregate';
200
		return $this->aggregateBase( $search, $key, $cfgkey, ['order.address'], $value, $type );
201
	}
202
203
204
	/**
205
	 * Creates a new empty item instance
206
	 *
207
	 * @param array $values Values the item should be initialized with
208
	 * @return \Aimeos\MShop\Order\Item\Address\Iface New order address item object
209
	 */
210
	public function create( array $values = [] ) : \Aimeos\MShop\Common\Item\Iface
211
	{
212
		$values['order.address.siteid'] = $values['order.address.siteid'] ?? $this->context()->locale()->getSiteId();
213
		return new \Aimeos\MShop\Order\Item\Address\Standard( 'order.address.', $values );
214
	}
215
216
217
	/**
218
	 * Creates a filter object.
219
	 *
220
	 * @param bool|null $default Add default criteria or NULL for relaxed default criteria
221
	 * @param bool $site TRUE for adding site criteria to limit items by the site of related items
222
	 * @return \Aimeos\Base\Criteria\Iface Returns the filter object
223
	 */
224
	public function filter( ?bool $default = false, bool $site = false ) : \Aimeos\Base\Criteria\Iface
225
	{
226
		return parent::filter( $default )->order( 'order.address.position' );
227
	}
228
229
230
	/**
231
	 * Returns the additional column/search definitions
232
	 *
233
	 * @return array Associative list of column names as keys and items implementing \Aimeos\Base\Criteria\Attribute\Iface
234
	 */
235
	public function getSaveAttributes() : array
236
	{
237
		return $this->createAttributes( $this->searchConfig );
238
	}
239
240
241
	/**
242
	 * Returns the attributes that can be used for searching.
243
	 *
244
	 * @param bool $withsub Return also attributes of sub-managers if true
245
	 * @return \Aimeos\Base\Criteria\Attribute\Iface[] List of search attribute items
246
	 */
247
	public function getSearchAttributes( bool $withsub = true ) : array
248
	{
249
		return array_replace( parent::getSearchAttributes( $withsub ), $this->createAttributes( [
250
			'order.address.id' => [
251
				'label' => 'Order address ID',
252
				'internalcode' => 'id',
253
				'internaldeps' => ['LEFT JOIN "mshop_order_address" AS mordad ON ( mord."id" = mordad."parentid" )'],
254
				'type' => 'int',
255
				'public' => false,
256
			]
257
		] ) );
258
	}
259
260
261
	/**
262
	 * Returns the prefix for the item properties and search keys.
263
	 *
264
	 * @return string Prefix for the item properties and search keys
265
	 */
266
	protected function prefix() : string
267
	{
268
		return 'order.address.';
269
	}
270
271
272
	/** mshop/order/manager/resource
273
	 * Name of the database connection resource to use
274
	 *
275
	 * You can configure a different database connection for each data domain
276
	 * and if no such connection name exists, the "db" connection will be used.
277
	 * It's also possible to use the same database connection for different
278
	 * data domains by configuring the same connection name using this setting.
279
	 *
280
	 * @param string Database connection name
281
	 * @since 2023.04
282
	 */
283
284
	/** mshop/order/manager/address/delete/mysql
285
	 * Deletes the items matched by the given IDs from the database
286
	 *
287
	 * @see mshop/order/manager/address/delete/ansi
288
	 */
289
290
	/** mshop/order/manager/address/delete/ansi
291
	 * Deletes the items matched by the given IDs from the database
292
	 *
293
	 * Removes the records specified by the given IDs from the order database.
294
	 * The records must be from the site that is configured via the
295
	 * context item.
296
	 *
297
	 * The ":cond" placeholder is replaced by the name of the ID column and
298
	 * the given ID or list of IDs while the site ID is bound to the question
299
	 * mark.
300
	 *
301
	 * The SQL statement should conform to the ANSI standard to be
302
	 * compatible with most relational database systems. This also
303
	 * includes using double quotes for table and column names.
304
	 *
305
	 * @param string SQL statement for deleting items
306
	 * @since 2014.03
307
	 * @see mshop/order/manager/address/insert/ansi
308
	 * @see mshop/order/manager/address/update/ansi
309
	 * @see mshop/order/manager/address/newid/ansi
310
	 * @see mshop/order/manager/address/search/ansi
311
	 * @see mshop/order/manager/address/count/ansi
312
	 */
313
314
	/** mshop/order/manager/address/submanagers
315
	 * List of manager names that can be instantiated by the order base address manager
316
	 *
317
	 * Managers provide a generic interface to the underlying storage.
318
	 * Each manager has or can have sub-managers caring about particular
319
	 * aspects. Each of these sub-managers can be instantiated by its
320
	 * parent manager using the getSubManager() method.
321
	 *
322
	 * The search keys from sub-managers can be normally used in the
323
	 * manager as well. It allows you to search for items of the manager
324
	 * using the search keys of the sub-managers to further limit the
325
	 * retrieved list of items.
326
	 *
327
	 * @param array List of sub-manager names
328
	 * @since 2014.03
329
	 */
330
331
	/** mshop/order/manager/address/name
332
	 * Class name of the used order base address manager implementation
333
	 *
334
	 * Each default order base address manager can be replaced by an alternative imlementation.
335
	 * To use this implementation, you have to set the last part of the class
336
	 * name as configuration value so the manager factory knows which class it
337
	 * has to instantiate.
338
	 *
339
	 * For example, if the name of the default class is
340
	 *
341
	 *  \Aimeos\MShop\Order\Manager\Address\Standard
342
	 *
343
	 * and you want to replace it with your own version named
344
	 *
345
	 *  \Aimeos\MShop\Order\Manager\Address\Myaddress
346
	 *
347
	 * then you have to set the this configuration option:
348
	 *
349
	 *  mshop/order/manager/address/name = Myaddress
350
	 *
351
	 * The value is the last part of your own class name and it's case sensitive,
352
	 * so take care that the configuration value is exactly named like the last
353
	 * part of the class name.
354
	 *
355
	 * The allowed characters of the class name are A-Z, a-z and 0-9. No other
356
	 * characters are possible! You should always start the last part of the class
357
	 * name with an upper case character and continue only with lower case characters
358
	 * or numbers. Avoid chamel case names like "MyAddress"!
359
	 *
360
	 * @param string Last part of the class name
361
	 * @since 2014.03
362
	 */
363
364
	/** mshop/order/manager/address/decorators/excludes
365
	 * Excludes decorators added by the "common" option from the order base address manager
366
	 *
367
	 * Decorators extend the functionality of a class by adding new aspects
368
	 * (e.g. log what is currently done), executing the methods of the underlying
369
	 * class only in certain conditions (e.g. only for logged in users) or
370
	 * modify what is returned to the caller.
371
	 *
372
	 * This option allows you to remove a decorator added via
373
	 * "mshop/common/manager/decorators/default" before they are wrapped
374
	 * around the order base address manager.
375
	 *
376
	 *  mshop/order/manager/address/decorators/excludes = array( 'decorator1' )
377
	 *
378
	 * This would remove the decorator named "decorator1" from the list of
379
	 * common decorators ("\Aimeos\MShop\Common\Manager\Decorator\*") added via
380
	 * "mshop/common/manager/decorators/default" for the order base address manager.
381
	 *
382
	 * @param array List of decorator names
383
	 * @since 2014.03
384
	 * @see mshop/common/manager/decorators/default
385
	 * @see mshop/order/manager/address/decorators/global
386
	 * @see mshop/order/manager/address/decorators/local
387
	 */
388
389
	/** mshop/order/manager/address/decorators/global
390
	 * Adds a list of globally available decorators only to the order base address manager
391
	 *
392
	 * Decorators extend the functionality of a class by adding new aspects
393
	 * (e.g. log what is currently done), executing the methods of the underlying
394
	 * class only in certain conditions (e.g. only for logged in users) or
395
	 * modify what is returned to the caller.
396
	 *
397
	 * This option allows you to wrap global decorators
398
	 * ("\Aimeos\MShop\Common\Manager\Decorator\*") around the order base
399
	 * address manager.
400
	 *
401
	 *  mshop/order/manager/address/decorators/global = array( 'decorator1' )
402
	 *
403
	 * This would add the decorator named "decorator1" defined by
404
	 * "\Aimeos\MShop\Common\Manager\Decorator\Decorator1" only to the order base
405
	 * address manager.
406
	 *
407
	 * @param array List of decorator names
408
	 * @since 2014.03
409
	 * @see mshop/common/manager/decorators/default
410
	 * @see mshop/order/manager/address/decorators/excludes
411
	 * @see mshop/order/manager/address/decorators/local
412
	 */
413
414
	/** mshop/order/manager/address/decorators/local
415
	 * Adds a list of local decorators only to the order base address manager
416
	 *
417
	 * Decorators extend the functionality of a class by adding new aspects
418
	 * (e.g. log what is currently done), executing the methods of the underlying
419
	 * class only in certain conditions (e.g. only for logged in users) or
420
	 * modify what is returned to the caller.
421
	 *
422
	 * This option allows you to wrap local decorators
423
	 * ("\Aimeos\MShop\Order\Manager\Address\Decorator\*") around the
424
	 * order base address manager.
425
	 *
426
	 *  mshop/order/manager/address/decorators/local = array( 'decorator2' )
427
	 *
428
	 * This would add the decorator named "decorator2" defined by
429
	 * "\Aimeos\MShop\Order\Manager\Address\Decorator\Decorator2" only
430
	 * to the order base address manager.
431
	 *
432
	 * @param array List of decorator names
433
	 * @since 2014.03
434
	 * @see mshop/common/manager/decorators/default
435
	 * @see mshop/order/manager/address/decorators/excludes
436
	 * @see mshop/order/manager/address/decorators/global
437
	 */
438
439
	/** mshop/order/manager/address/insert/mysql
440
	 * Inserts a new order record into the database table
441
	 *
442
	 * @see mshop/order/manager/address/insert/ansi
443
	 */
444
445
	/** mshop/order/manager/address/insert/ansi
446
	 * Inserts a new order record into the database table
447
	 *
448
	 * Items with no ID yet (i.e. the ID is NULL) will be created in
449
	 * the database and the newly created ID retrieved afterwards
450
	 * using the "newid" SQL statement.
451
	 *
452
	 * The SQL statement must be a string suitable for being used as
453
	 * prepared statement. It must include question marks for binding
454
	 * the values from the order item to the statement before they are
455
	 * sent to the database server. The number of question marks must
456
	 * be the same as the number of columns listed in the INSERT
457
	 * statement. The order of the columns must correspond to the
458
	 * order in the save() method, so the correct values are
459
	 * bound to the columns.
460
	 *
461
	 * The SQL statement should conform to the ANSI standard to be
462
	 * compatible with most relational database systems. This also
463
	 * includes using double quotes for table and column names.
464
	 *
465
	 * @param string SQL statement for inserting records
466
	 * @since 2014.03
467
	 * @see mshop/order/manager/address/update/ansi
468
	 * @see mshop/order/manager/address/newid/ansi
469
	 * @see mshop/order/manager/address/delete/ansi
470
	 * @see mshop/order/manager/address/search/ansi
471
	 * @see mshop/order/manager/address/count/ansi
472
	 */
473
474
	/** mshop/order/manager/address/update/mysql
475
	 * Updates an existing order record in the database
476
	 *
477
	 * @see mshop/order/manager/address/update/ansi
478
	 */
479
480
	/** mshop/order/manager/address/update/ansi
481
	 * Updates an existing order record in the database
482
	 *
483
	 * Items which already have an ID (i.e. the ID is not NULL) will
484
	 * be updated in the database.
485
	 *
486
	 * The SQL statement must be a string suitable for being used as
487
	 * prepared statement. It must include question marks for binding
488
	 * the values from the order item to the statement before they are
489
	 * sent to the database server. The order of the columns must
490
	 * correspond to the order in the save() method, so the
491
	 * correct values are bound to the columns.
492
	 *
493
	 * The SQL statement should conform to the ANSI standard to be
494
	 * compatible with most relational database systems. This also
495
	 * includes using double quotes for table and column names.
496
	 *
497
	 * @param string SQL statement for updating records
498
	 * @since 2014.03
499
	 * @see mshop/order/manager/address/insert/ansi
500
	 * @see mshop/order/manager/address/newid/ansi
501
	 * @see mshop/order/manager/address/delete/ansi
502
	 * @see mshop/order/manager/address/search/ansi
503
	 * @see mshop/order/manager/address/count/ansi
504
	 */
505
506
	/** mshop/order/manager/address/newid/mysql
507
	 * Retrieves the ID generated by the database when inserting a new record
508
	 *
509
	 * @see mshop/order/manager/address/newid/ansi
510
	 */
511
512
	/** mshop/order/manager/address/newid/ansi
513
	 * Retrieves the ID generated by the database when inserting a new record
514
	 *
515
	 * As soon as a new record is inserted into the database table,
516
	 * the database server generates a new and unique identifier for
517
	 * that record. This ID can be used for retrieving, updating and
518
	 * deleting that specific record from the table again.
519
	 *
520
	 * For MySQL:
521
	 *  SELECT LAST_INSERT_ID()
522
	 * For PostgreSQL:
523
	 *  SELECT currval('seq_mord_id')
524
	 * For SQL Server:
525
	 *  SELECT SCOPE_IDENTITY()
526
	 * For Oracle:
527
	 *  SELECT "seq_mord_id".CURRVAL FROM DUAL
528
	 *
529
	 * There's no way to retrive the new ID by a SQL statements that
530
	 * fits for most database servers as they implement their own
531
	 * specific way.
532
	 *
533
	 * @param string SQL statement for retrieving the last inserted record ID
534
	 * @since 2014.03
535
	 * @see mshop/order/manager/address/insert/ansi
536
	 * @see mshop/order/manager/address/update/ansi
537
	 * @see mshop/order/manager/address/delete/ansi
538
	 * @see mshop/order/manager/address/search/ansi
539
	 * @see mshop/order/manager/address/count/ansi
540
	 */
541
542
	/** mshop/order/manager/address/search/mysql
543
	 * Retrieves the records matched by the given criteria in the database
544
	 *
545
	 * @see mshop/order/manager/address/search/ansi
546
	 */
547
548
	/** mshop/order/manager/address/search/ansi
549
	 * Retrieves the records matched by the given criteria in the database
550
	 *
551
	 * Fetches the records matched by the given criteria from the order
552
	 * database. The records must be from one of the sites that are
553
	 * configured via the context item. If the current site is part of
554
	 * a tree of sites, the SELECT statement can retrieve all records
555
	 * from the current site and the complete sub-tree of sites.
556
	 *
557
	 * As the records can normally be limited by criteria from sub-managers,
558
	 * their tables must be joined in the SQL context. This is done by
559
	 * using the "internaldeps" property from the definition of the ID
560
	 * column of the sub-managers. These internal dependencies specify
561
	 * the JOIN between the tables and the used columns for joining. The
562
	 * ":joins" placeholder is then replaced by the JOIN strings from
563
	 * the sub-managers.
564
	 *
565
	 * To limit the records matched, conditions can be added to the given
566
	 * criteria object. It can contain comparisons like column names that
567
	 * must match specific values which can be combined by AND, OR or NOT
568
	 * operators. The resulting string of SQL conditions replaces the
569
	 * ":cond" placeholder before the statement is sent to the database
570
	 * server.
571
	 *
572
	 * If the records that are retrieved should be ordered by one or more
573
	 * columns, the generated string of column / sort direction pairs
574
	 * replaces the ":order" placeholder. Columns of
575
	 * sub-managers can also be used for ordering the result set but then
576
	 * no index can be used.
577
	 *
578
	 * The number of returned records can be limited and can start at any
579
	 * number between the begining and the end of the result set. For that
580
	 * the ":size" and ":start" placeholders are replaced by the
581
	 * corresponding values from the criteria object. The default values
582
	 * are 0 for the start and 100 for the size value.
583
	 *
584
	 * The SQL statement should conform to the ANSI standard to be
585
	 * compatible with most relational database systems. This also
586
	 * includes using double quotes for table and column names.
587
	 *
588
	 * @param string SQL statement for searching items
589
	 * @since 2014.03
590
	 * @see mshop/order/manager/address/insert/ansi
591
	 * @see mshop/order/manager/address/update/ansi
592
	 * @see mshop/order/manager/address/newid/ansi
593
	 * @see mshop/order/manager/address/delete/ansi
594
	 * @see mshop/order/manager/address/count/ansi
595
	 */
596
597
	/** mshop/order/manager/address/count/mysql
598
	 * Counts the number of records matched by the given criteria in the database
599
	 *
600
	 * @see mshop/order/manager/address/count/ansi
601
	 */
602
603
	/** mshop/order/manager/address/count/ansi
604
	 * Counts the number of records matched by the given criteria in the database
605
	 *
606
	 * Counts all records matched by the given criteria from the order
607
	 * database. The records must be from one of the sites that are
608
	 * configured via the context item. If the current site is part of
609
	 * a tree of sites, the statement can count all records from the
610
	 * current site and the complete sub-tree of sites.
611
	 *
612
	 * As the records can normally be limited by criteria from sub-managers,
613
	 * their tables must be joined in the SQL context. This is done by
614
	 * using the "internaldeps" property from the definition of the ID
615
	 * column of the sub-managers. These internal dependencies specify
616
	 * the JOIN between the tables and the used columns for joining. The
617
	 * ":joins" placeholder is then replaced by the JOIN strings from
618
	 * the sub-managers.
619
	 *
620
	 * To limit the records matched, conditions can be added to the given
621
	 * criteria object. It can contain comparisons like column names that
622
	 * must match specific values which can be combined by AND, OR or NOT
623
	 * operators. The resulting string of SQL conditions replaces the
624
	 * ":cond" placeholder before the statement is sent to the database
625
	 * server.
626
	 *
627
	 * Both, the strings for ":joins" and for ":cond" are the same as for
628
	 * the "search" SQL statement.
629
	 *
630
	 * Contrary to the "search" statement, it doesn't return any records
631
	 * but instead the number of records that have been found. As counting
632
	 * thousands of records can be a long running task, the maximum number
633
	 * of counted records is limited for performance reasons.
634
	 *
635
	 * The SQL statement should conform to the ANSI standard to be
636
	 * compatible with most relational database systems. This also
637
	 * includes using double quotes for table and column names.
638
	 *
639
	 * @param string SQL statement for counting items
640
	 * @since 2014.03
641
	 * @see mshop/order/manager/address/insert/ansi
642
	 * @see mshop/order/manager/address/update/ansi
643
	 * @see mshop/order/manager/address/newid/ansi
644
	 * @see mshop/order/manager/address/delete/ansi
645
	 * @see mshop/order/manager/address/search/ansi
646
	 */
647
}
648