Small Class Manipulator

WBOY
Release: 2024-09-06 06:44:32
Original
440 people have browsed it

Small Class Manipulator

New major release of Small Class manipulator

The code have been fully refactored and coded a new support of attributes manipulation

Here is an example of manipulation :

    $classFile = \Small\ClassManipulator\ClassManipulator::fromProject(__DIR__ . '/../..')
        ->getClass(\Small\ClassManipulator\Test\Fixture\SimpleClass::class)
        ->parse();
    $classFile->getClass()->getAttributes()->push(
        (new \Small\ClassManipulator\ClassFile\Bean\AttributeBean())
            ->setClass('\ORM')
    );
    $classFile->write();
Copy after login

Find out on :

  • git : https://git.small-project.dev/lib/small-class-manipulator
  • packagist : https://packagist.org/packages/small/class-manipulator

The above is the detailed content of Small Class Manipulator. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!