CakePHP Cookbook Documentation 5.ximproved application performance. See the Improve Your Application’s Performance for how to do this. Collection • Added unique() which filters out duplicate value specified by provided callback. • reject() CakePHP’s models are composed of Table and Entity objects. Table objects provide access to the collection of entities stored in a specific table. They are stored in src/Model/Table. The file we’ll be creating add this use statement right below the namespace declaration to import // the Collection class use Cake\Collection\Collection; // Update the accessible property to contain `tag_string` protected array $_accessible0 码力 | 848 页 | 2.53 MB | 1 年前3
CakePHP Cookbook Documentation 5.xCollections Collection Quick Example List of Methods Iterating Collection::each() Collection::map() Collection::extract() Collection::combine() Collection::stopWhen() Collection::unfold() Collection::chunk() Collection::chunk() Collection::chunkWithKeys() Filtering Collection::filter() Collection::reject() Collection::every() Collection::some() Collection::match() Collection::firstMatch() Aggregation Collection::reduce() Collection::reduce() Collection::min() Collection::max() Collection::sumOf() Collection::avg() Collection::median() Grouping and Counting Sorting Collection::sortBy() Working with Tree Data Collection::nest() Coll0 码力 | 1080 页 | 939.39 KB | 1 年前3
CakePHP Cookbook 3.x
CakePHP’s models are composed of Table and Entity objects. Table objects provide access to the collection of entities stored in a specific table. They are stored in src/Model/Table. The file we’ll be creating Features Collection • CollectionTrait now uses the newCollection method to create clones. This allows sub-classes to have collection methods create instances of themselves instead of using Collection. 3.8 Cache • Fallback engines can be disabled by setting fallback = false for any cache configuration. Collection • The appendItem(), prepend(), prependItems() methods were added to CollectionTrait. 3.6 Migration0 码力 | 967 页 | 2.80 MB | 1 年前3
CakePHP Cookbook 4.x
CakePHP’s models are composed of Table and Entity objects. Table objects provide access to the collection of entities stored in a specific table. They are stored in src/Model/Table. The file we’ll be creating signature of any methods they do change the semantics or behavior of methods. Collection • Collection::groupBy() and Collection::indexBy() now throw an exception when the path does not exist or the path do not change the signature of any methods they do change the semantics or behavior of methods. Collection • Renamed $preserveKeys parameter to $keepKeys with same implementation. Command • cake i18n0 码力 | 967 页 | 2.88 MB | 1 年前3
CakePHP Cookbook 4.x
Collections Collection Quick Example List of Methods Iterating Collection::each() Collection::map() Collection::extract() Collection::combine() Collection::stopWhen() Collection::unfold() Collection::chunk() Collection::chunk() Collection::chunkWithKeys() Filtering Collection::filter() Collection::reject() Collection::every() Collection::some() Collection::match() Collection::firstMatch() Aggregation Collection::reduce() Collection::reduce() Collection::min() Collection::max() Collection::sumOf() Collection::avg() Collection::median() Grouping and Counting Sorting Collection::sortBy() Working with Tree Data Collection::nest() Coll0 码力 | 1249 页 | 1.04 MB | 1 年前3
CakePHP Cookbook 3.x
Tree Data Other Methods Withdrawing Elements Expanding Collections Modifiying Elements Making Collection Methods Reusable Optimizing Collections Making Collections Rewindable Cloning Collections Folder CakePHP’s models are composed of Table and Entity objects. Table objects provide access to the collection of entities stored in a specific table. They are stored in src/Model/Table. The file we’ll be creating Features Collection CollectionTrait now uses the newCollection method to create clones. This allows sub-classes to have collection methods create instances of themselves instead of using Collection. Console0 码力 | 1244 页 | 1.05 MB | 1 年前3
CakePHP Cookbook 2.x
controller action. In situations like this you can load a component at runtime using the Component Collection. From inside a controller’s method you can do the following: $this->OneTimer = $this->Compone provides prototypes for all the component callbacks. Component::__construct(ComponentCollection $collection, $settings = array()) Constructor for the base component class. All $settings that are also public $mediaHelper = $this->Helpers->load('Media', $mediaSettings); The HelperCollection is a collection and supports the collection API used elsewhere in CakePHP. Callback methods Helpers feature several callbacks0 码力 | 1096 页 | 958.62 KB | 1 年前3
CakePHP Cookbook 2.x
controller action. In situations like this you can load a component at runtime using the Component Collection. From inside a controller’s method you can do the following: $this->OneTimer = $this->Compone provides prototypes for all the component callbacks. Component::__construct(ComponentCollection $collection, $settings = array()) Constructor for the base component class. All $settings that are also public $mediaHelper = $this->Helpers->load('Media', $mediaSettings); The HelperCollection is a collection and supports the collection API used elsewhere in CakePHP. More about Views 191 CakePHP Cookbook Documentation0 码力 | 820 页 | 2.52 MB | 1 年前3
共 8 条
- 1













